/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package model;

import com.j256.ormlite.dao.Dao;
import com.j256.ormlite.dao.DaoManager;
import com.j256.ormlite.stmt.PreparedQuery;
import com.j256.ormlite.stmt.QueryBuilder;
import com.j256.ormlite.support.ConnectionSource;
import entities.UsrUser;
import java.sql.SQLException;
import java.util.logging.Level;
import java.util.logging.Logger;
import org.zkoss.zk.ui.SuspendNotAllowedException;
import org.zkoss.zk.ui.util.*;
import org.zkoss.zul.*;
import java.util.List;
import javax.naming.Context;
import javax.naming.InitialContext;
import javax.servlet.ServletContext;
import javax.servlet.http.HttpServletRequest;
import javax.sql.DataSource;
import org.apache.tomcat.dbcp.dbcp.BasicDataSource;
import org.zkoss.web.portlet.RenderHttpServletRequest;
import org.zkoss.web.servlet.xel.RequestContext;
import org.zkoss.web.servlet.xel.RequestContexts;
import org.zkoss.zk.ui.Executions;
import org.zkoss.zk.ui.Session;
import org.zkoss.zk.ui.Sessions;
import org.zkoss.zk.ui.ext.AfterCompose;

/**
 * @author JS: Juan Sanjuan
 * This Class Controls the behibor and events of 
 * controls  at login.zul
 */
public class LoginControlador  extends GenericAutowireComposer  {
    private Toolbarbutton lblStstus;
    public void onCrear()
    {
        if(Executions.getCurrent().getParameter("login_error") != null && Executions.getCurrent().getParameter("login_error").equals("1"))
            {
                lblStstus.setLabel("Error de clave o usuario");
                lblStstus.setStyle("color:red");
            }
    }
}
